# Copyright (C) 2007 Dave Moore
# Copyright (C) 2007 Steve Mulligan
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

#include <gtk/gtk.h>
#include <libxfce4util/libxfce4util.h>
#include <libxfce4panel/xfce-panel-plugin.h>
#include <libxfce4panel/xfce-hvbox.h>

#include "slex.h"

// prototypes
static void slex_construct (XfcePanelPlugin *plugin);

// register the plugin 
XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (slex_construct);


static void slex_construct (XfcePanelPlugin *plugin)
{
	SlexPlugin *slex;

	// setup transation domain
	xfce_textdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
	// create the plugin
	slex_new(plugin);
}

static SlexPlugin* slex_new(XfcePanelPlugin *plugin)
{
	SlexPlugin     *slex
	GtkWidget      *button;
	
	slex = panel_slice_new0(SlexPlugin);
	slex->plugin = plugin;
	
	slex->button = gtk_button_new_with_label("Slex");
	gtk_widget_show(slex->button);
	
	return slex;
}

static void slex_free(XfcePanelPlugin *plugin, SlexPlugin *slex)
{
	gtk_widget_destroy(slex->button);
	
	panel_slice_free(SlexPlugin, plugin);
}
